﻿using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json;

namespace Dyao.Book.Contract
{
    public class OperationLogDto
    {
        /// <summary>
        /// 原编号
        /// </summary>
        public string SourceId { get; set; }

        /// <summary>
        /// 日志类型
        /// </summary>
        public OperationTypeEnum OperationType { get; set; }

        /// <summary>
        /// 操作日志
        /// </summary>
        public string OperationLog { get; set; }
    }

    public class OperationLogFilterDto : PaginationFilterDto
    {
        /// <summary>
        /// 源编号
        /// </summary>
        [Required(ErrorMessage = "源编号不能为空")]
        public string SourceId { get; set; }
    }

    public class OperationLogResultDto
    {
        /// <summary>
        /// ID
        /// </summary>
        [JsonProperty("id")]
        public string ID { get; set; }

        /// <summary>
        /// 操作日志
        /// </summary>
        public string OperationLog { get; set; }

        /// <summary>
        /// 用户名称
        /// </summary>
        public string CreateUserName { get; set; }

        /// <summary>
        /// 爬取时间
        /// </summary>
        public DateTime CreateDateTime { get; set; }
    }
}
